
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
    <style>
        .box {
            width: 300px;
            height: 500px;
            position: absolute;
            top: 10px;
            bottom: 0;
            left: 20px;
            background-color: #00ccff;
        }
        .bax{
            width: 350px;
            height: 450px;
            position: absolute;
            top: 10px;
            bottom: 0;
           right: 20px;
            background-color: #00ccff;
        }
        .sa{
            width: 300px;
            height: 340px;
            position: absolute;
            top: 400px;
            bottom: 0;
            left: 400px;
            background-color: #00ccff;
        }
        .qq{
            width: 300px;
            height: 340px;
            position: absolute;
            top: 400px;
            bottom: 0;
            right: 400px;
            background-color: #00ccff;
         }
        .texiao{
            position: absolute;
            top: 460px;
            bottom: 0;
            right: 10px;
        }
        .bb{
            position: absolute;
            top: 110px;
            bottom: 50px;
            left:240px;
            right: 5px;
            background-color: #2c3e50;
        }
    </style>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/qwe.js"></script>
</head>
<body>

<div class="bb">

    <div class="box"></div>
    <div class="bax"></div>
    <div class="shijue">
        <jsp:include page="adim-shijue.jsp"></jsp:include>
    </div>
    <div class="texiao"><jsp:include page="adim-texiao.jsp"></jsp:include></div>
    <div class="sa"></div>
    <div class="qq"></div>
</div>
<script>
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.querySelector('.box'));
    var my= echarts.init(document.querySelector('.bax'));
    var ma= echarts.init(document.querySelector('.sa'));
    var qq= echarts.init(document.querySelector('.qq'));
    var option = {
        title: {
            text: '人数统计',
            subtext: '各班级人数比例',
            left: 'center'
        },
        tooltip: {
            trigger: 'item'
        },
        legend: {
            orient: 'vertical',
            left: 'left'
        },
        series: [
            {
                name: 'Access From',
                type: 'pie',
                radius: '50%',
                data: [
                    { value: 120, name: 'as' },
                    { value: 735, name: 'Direct' },
                    { value: 580, name: 'Email' },
                    { value: 484, name: 'Union Ads' },
                    { value: 300, name: 'Video Ads' }
                ],
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    const labelRight = {
        position: 'right'
    };
    var juxing = {
        title: {
            text: '各学院人数分布图'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        grid: {
            top: 80,
            bottom: 30
        },
        xAxis: {
            type: 'value',
            position: 'top',
            splitLine: {
                lineStyle: {
                    type: 'dashed'
                }
            }
        },
        yAxis: {
            type: 'category',
            axisLine: { show: false },
            axisLabel: { show: false },
            axisTick: { show: false },
            splitLine: { show: false },
            data: [
                '干死小日本学院',
                '火烧靖国神厕学院',
                '刺杀拜登学院',
                '红旗满天下学院',
                '马踏京东学院'
            ]
        },
        series: [
            {
                name: '人数',
                type: 'bar',
                stack: 'Total',
                label: {
                    show: true,
                    formatter: '{b}'
                },
                data: [
                    ${bb},
                    ${aa},
                    ${cc},
                    ${ee},
                    ${dd}
                ]
            }
        ]
    };
    var gendr = {
        title: [
            {
                text: '全校男女性别比例'
            }
        ],
        polar: {
            radius: [30, '80%']
        },
        angleAxis: {
            max: 10,
            startAngle: 75
        },
        radiusAxis: {
            type: 'category',
            data: [ '女','男']
        },
        tooltip: {},
        series: {
            type: 'bar',
            data: [4,6],
            coordinateSystem: 'polar',
            label: {
                show: true,
                position: 'middle',
                formatter: '{b}: {c}'
            }
        }
    };
    var book = {
        tooltip: {
            trigger: 'item'
        },
        legend: {
            top: '5%',
            left: 'center'
        },
        series: [
            {
                name: '图书情况',
                type: 'pie',
                radius: ['40%', '70%'],
                avoidLabelOverlap: false,
                itemStyle: {
                    borderRadius: 10,
                    borderColor: '#fff',
                    borderWidth: 2
                },
                label: {
                    show: false,
                    position: 'center'
                },
                emphasis: {
                    label: {
                        show: true,
                        fontSize: '40',
                        fontWeight: 'bold'
                    }
                },
                labelLine: {
                    show: false
                },
                data: [
                    { value: 1048, name: '全部图书整数' },
                    { value: 735, name: '被借图书数量' },

                ]
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
    my.setOption(juxing);
    ma.setOption(gendr);
    qq.setOption(book);
</script>
</body>
</html>
